const { Schema, SchemaTypes, model } = require("mongoose");
require("./User");
const CheckCodeSchema = new Schema(
    {
        code: {
            type: String,
        },
        expiredTime: {
            type: Number,
        },
        email: {
            type: String,
            ref: "User",
        },
        type: {
            type: String,
            default: "login",//login,register
        },
    },
    { timestamps: { createdAt: "createTime", updatedAt: "updateTime" } }
);
module.exports = model("CheckCode", CheckCodeSchema);
